forum

home / developersection / forums / result of linq.any to string

Result of LINQ.Any to string

Anonymous User 2245 05-Oct-2013

So, I check if a string contains a certain word from an array with the following statement:

if(stringArray.Any(s => stringToCheck.Contains(s)))


Simple. Now a match is found and the statement is true. But I want to know also which item in the array matched with the string. The placeholder "s" in the LINQ statement above is not available in the following clause.


c# c# 
Updated on 05-Oct-2013

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By